import request from "@/request/index.js";

//获取所有租约
// export function getLease() {
// 	return request(
// 		`/front/broker/lease/list`,'get', null)
// }
export function getLease(leaseState = "", sortColumn = "",serchValue="", sortOrder = "desc", ) { //租约状态      //排序列名        //排序方式
	return request(
		`/front/broker/lease/list?leaseState=${leaseState}&sortColumn=${sortColumn}&sortOrder=${sortOrder}&serchValue=${serchValue}`,
 
		'get', null)
}
//租约详情
export function getLeaseDetail(id) {
	return request('/front/broker/lease/' + id, 'get', null)
}

//新增租约 
export function addLease(data){
	return request(`/front/broker/lease/recordLease`,'post',data)
}

//修改租约
export function putLease(data){
	return request(`/front/broker/lease`,'put',data)
}
//根据房源ID获取房东信息
export function getLandlordInfo(houseId){
	return request(`/front/broker/lease/landlord/`+ houseId,'get',null)
}